<?php
/**
 * Created by PhpStorm.
 * User: chenxuyi
 * Date: 2018/3/3
 * Time: 下午5:21
 */

namespace App\Services;

use Illuminate\Http\Request;
use Cache;

class TokenManageService
{

    protected $token;
    protected $admin;

    public function __construct(Request $request)
    {
        $this->token = $request->get('token', null);
        $this->admin = Cache::get($this->token);
    }

    public function getAdminUserId()
    {
        return $this->admin['admin_user_id'];
    }

    public function getAdminUserName()
    {
        return $this->admin['admin_user_name'];
    }

}